<?php
require_once('model/Advertisement.php');

class Advertisement extends DataObjects_Advertisement
{
	
	/**
	 * Get all Advertisement
	 *
	 * @return Advertisement object
	 */
	public function getList($pagination = true){
		$advertise = new Advertisement();
		$advertise->orderBy('id');
		if($pagination){
			$p = new FRM_Pager('page',Parameter::$params["PAGING_DEFAULT_ITEM_PER_PAGE"], new FRM_Pager_RangeIterator(1, Parameter::$params['PAGING_DEFAULT_PAGE_DELTA'], 1));
			$advertise->setPager($p);
		}
		$advertise->find();
		
		return $advertise;
	}

}
?>